//
//  MineSnap.m
//  project_delicious
//
//  Created by 章历杰 on 15/3/28.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "MineSnap.h"
#import "UIColor+AddColor.h"
@implementation MineSnap


- (void)dealloc
{
    [_pic release];
    [_word release];
    [_to release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        //图片
        self.pic = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, self.frame.size.width/10, self.frame.size.height-20)];
        self.pic.layer.masksToBounds = YES;
        [self addSubview:self.pic];
        [_pic release];
//        //箭头
//        self.to = [[UIImageView alloc] initWithFrame:CGRectMake(self.frame.size.width-self.frame.size.width/10-2, 10, self.frame.size.width/10, self.frame.size.height-20)];
//        self.to.image = [UIImage imageNamed:@"next.png"];
//        self.to.layer.masksToBounds = YES;
//        [self addSubview:self.to];
//        [_to release];
        //文字
        //self.word = [[UILabel alloc] initWithFrame:CGRectMake(self.pic.frame.origin.x+self.pic.frame.size.width+10, 2, 200, self.frame.size.height-4)];
        self.word = [[UILabel alloc] init];
        self.word.font= [UIFont systemFontOfSize:14];
        self.word.textAlignment = NSTextAlignmentCenter;
        self.word.layer.borderWidth = 2;
        self.word.layer.borderColor = [[UIColor colorFromHexCode:@"56abe4"] CGColor];
        self.word.layer.cornerRadius = 20;
        self.word.backgroundColor = [UIColor colorFromHexCode:@"f2eada"];
        self.word.layer.masksToBounds = YES;
        [self addSubview:self.word];
        [self.word release];
        
    }
    return self;
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
